﻿using UnityEngine;
using System.Collections;

public delegate void TerrainGenerationHandle (bool validation);

public class TerrainGen : MonoBehaviour
{	
	//Terrain For generating the Overworld
	public Terrain terrain;

	public event TerrainGenerationHandle TerrainFinishEvent;

	// Use this for initialization
	void Start ()
	{



		if (terrain != null) {
			generateTerrain ();
		}
	}
	
	// Update is called once per frame
	void Update ()
	{
	
	}

	private void generateTerrain ()
	{

		//Send the event out when finished
		if (TerrainFinishEvent != null) {
			TerrainFinishEvent (true);
		}
	}

	
}
